import BTConditional from '../../Base/BTConditional'
import BlackBoard from '../../BlackBoard'
import { NodeStatus } from '../../Enum'

export default class ConditionalHP extends BTConditional {
  onUpdate() {
    console.log(
      'BlackBoard.Instance.hp',
      BlackBoard.Instance.hp,
      'ConditionalMP判断结果为:',
      BlackBoard.Instance.hp >= 100
    )

    if (BlackBoard.Instance.hp >= 100) {
      return NodeStatus.Success
    }
    return NodeStatus.Failure
  }
}
